//
//  IntegralCell.m
//  MoXiProject
//
//  Created by 周筱雯 on 2017/6/29.
//  Copyright © 2017年 周筱雯. All rights reserved.
//

#import "IntegralCell.h"
#import "MineModel.h"

@interface IntegralCell ()
@property (weak, nonatomic) IBOutlet UILabel *showDate;
@property (weak, nonatomic) IBOutlet UILabel *showType;
@property (weak, nonatomic) IBOutlet UILabel *showScore;

@end

@implementation IntegralCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void) setIntegralDataSource:(ShowCoreModel *) showModel{

    [self.showDate setText:[MXUtility getTimeWithTimestamp:showModel.showcreateTime WithDateFormat:@"yyyy-MM-dd"]];
    [self.showType setText:showModel.showtypeName];
    
    if ([showModel.showmark integerValue] == 0) {
        
        [self.showScore setText:[NSString stringWithFormat:@"+%@",showModel.showscoreDetail]];
        [self.showScore setTextColor:DEF_COLOR_38BD18];
    }
    else if ([showModel.showmark integerValue] == 1){
        
        [self.showScore setText:[NSString stringWithFormat:@"-%@",showModel.showscoreDetail]];
        [self.showScore setTextColor:DEF_COLOR_MAINCOLOR];
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
